<%- model_class = Task -%>
<div class="page-header">
  <h1><%=t '.title', :default => model_class.model_name.human.titleize %> - <%= @task.finished? ? 'finished' : 'unfinish' %></h1>
</div>

<dl class="dl-horizontal">
  <dt><strong><%= model_class.human_attribute_name(:name) %>:</strong></dt>
  <dd><%= @task.name %></dd>
  <dt><strong><%= model_class.human_attribute_name(:goal) %>:</strong></dt>
  <dd><%= @task.fingers.valid.size %>/<%= @task.num_of_fingers %> x <%= @task.num_of_samples %></dd>
  <dt><strong><%= model_class.human_attribute_name(:candidate_fingers) %>:</strong></dt>
  <dd><%= @task.fingers.count %>-<%= @task.fingers.invalid.size + @task.fingers.suspect.size %></dd>
  <dt><strong><%= model_class.human_attribute_name(:candidate_samples) %>:</strong></dt>
  <dd><%= @task.samples.count %></dd>
  <dt><strong><%= model_class.human_attribute_name(:suspect) %>:</strong></dt>
  <dd><%= @task.fingers.suspect.size %></dd>
  <dt><strong><%= model_class.human_attribute_name(:censored) %>:</strong></dt>
  <dd><%= @task.results.size %></dd>
</dl>

<%= link_to "Start Censor", censor_task_path, class: 'btn btn-default', disabled: @task.finished? %>
<%= link_to t('.back', :default => t("helpers.links.back")),
              tasks_path, :class => 'btn btn-default'  %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
              edit_task_path(@task), :class => 'btn btn-default' %>
<%= link_to t('.destroy', :default => t("helpers.links.destroy")),
              task_path(@task),
              :method => 'delete',
              :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
              :class => 'btn btn-danger' %>
<% if @task.finished? %>
<%= link_to 'VIEW', view_task_path(@task), class: 'btn btn-default' %>
<% end %>
<%= link_to 'Fingers', fingers_path(@task), class: 'btn btn-default' %>
<%= link_to 'Result', results_path(@task), class: 'btn btn-default' %>